package com.sztz.mapstruct.K映射转换;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * CarMapper
 *
 * @author yyf
 * @email yeyafei@hotmail.com
 */
@Mapper(uses = Encryption.class)
public interface CarMapper {

    CarMapper INSTANCE = Mappers.getMapper(CarMapper.class);

    /**
     * 映射转换
     *
     * @param car
     * @return CarDto
     */
    @Mapping(target = "name",qualifiedByName = {"md5"})
    CarDTO toDto(Car car);
}
